package org.gwt.grin.rebind.features;

import org.gwt.grin.client.features.Group;
import org.gwt.grin.rebind.SEFeature;
import org.gwt.grin.rebind.ShowBuilder;

import com.google.gwt.uibinder.rebind.IndentedWriter;

public class SEGroup extends SEFeature {

	private SEFeature[] parts;

	public SEGroup(String name) {
		super(name);
	}

	public void setup(SEFeature[] parts) {
		this.parts = parts;
	}

	@Override
	public void setup(IndentedWriter w, ShowBuilder builder) {
		String vn = getVN(builder);
		w.write("%s.setup(%s);", vn, makeFeaturesArray(builder, parts));
	}

	@Override
	protected String getClassName() {
		return Group.class.getName();
	}

}
